package com.gxar.navigation.server.base.interception;


import com.gxar.navigation.server.base.model.qimen.UserProfile;

/**
 * 登录用户线程池
 * 存放登录用户信息
 *
 * @author Linsy
 * @version 1.0
 * @created 2023/6/20
 */
public class LoginUserThread {

    /**
     * 用户线程变量
     */
    private static final ThreadLocal<UserProfile> LOGIN_USER = new ThreadLocal<>();

    private LoginUserThread() {
    }

    public static UserProfile get() {
        return LOGIN_USER.get();
    }

    public static void put(UserProfile user) {
        LOGIN_USER.set(user);
    }

    public static void remove() {
        LOGIN_USER.remove();
    }

}